package qe.spider.trade.huaxin;

import java.util.HashMap;
import java.util.Map;

public class ErrorsHuaXin {
    public static Map<Integer, String> ERRORS = new HashMap<>();

    static {
        ERRORS.put(0, "正确");
        ERRORS.put(5, "接口版本已过期");
        ERRORS.put(256, "交易所未初始化");
        ERRORS.put(257, "系统已暂停或关闭");
        ERRORS.put(258, "找不到用户");
        ERRORS.put(259, "找不到投资者");
        ERRORS.put(260, "找不到股东账户");
        ERRORS.put(261, "找不到默认投资单元");
        ERRORS.put(262, "找不到交易单元");
        ERRORS.put(263, "找不到证券信息");
        ERRORS.put(264, "找不到报单");
        ERRORS.put(265, "找不到撤单");
        ERRORS.put(266, "找不到新股申购额度");
        ERRORS.put(267, "找不到行情");
        ERRORS.put(268, "找不到配股配债信息");
        ERRORS.put(269, "找不到资金账户");
        ERRORS.put(270, "找不到持仓");
        ERRORS.put(272, "找不到ETF清单信息");
        ERRORS.put(273, "找不到ETF成分股信息");
        ERRORS.put(274, "找不到ETF证券信息");
        ERRORS.put(275, "找不到质押持仓");
        ERRORS.put(277, "找不到标准券信息");
        ERRORS.put(278, "找不到质押信息");
        ERRORS.put(280, "找不到持仓交易属性");
        ERRORS.put(281, "找不到LOF基金信息");
        ERRORS.put(284, "找不到组件运行信息");
        ERRORS.put(285, "找不到有效的席位通道");
        ERRORS.put(287, "找不到新股申购信息");
        ERRORS.put(288, "找不到投资者的交易协议");
        ERRORS.put(290, "无效的投资者代码");
        ERRORS.put(291, "当前交易日不支持该业务");
        ERRORS.put(292, "用户未激活");
        ERRORS.put(293, "生成本地报单编号失败");
        ERRORS.put(294, "生成系统报单编号失败");
        ERRORS.put(296, "生成流水号失败");
        ERRORS.put(297, "无效的认证方式");
        ERRORS.put(298, "不支持的委托方式");
        ERRORS.put(303, "无效的投资单元");
        ERRORS.put(304, "无效的报单价格类型");
        ERRORS.put(305, "无效的套保标志");
        ERRORS.put(306, "无效的持仓方向");
        ERRORS.put(307, "无效的报单类别");
        ERRORS.put(308, "报单状态异常");
        ERRORS.put(309, "报单非法拥有者");
        ERRORS.put(310, "密码不正确");
        ERRORS.put(311, "证券长期停牌");
        ERRORS.put(312, "证券退市转让");
        ERRORS.put(313, "证券暂停上市转让");
        ERRORS.put(314, "证券熔断不接新订单");
        ERRORS.put(315, "无效申报价格");
        ERRORS.put(316, "申报价必是最小单位整数倍");
        ERRORS.put(317, "无效申报金额");
        ERRORS.put(318, "价格超过涨跌停板限制");
        ERRORS.put(319, "非法市价单类型");
        ERRORS.put(320, "无效申报数量");
        ERRORS.put(321, "申报数量非交易单位整数倍");
        ERRORS.put(322, "申报量超出单笔申报限制");
        ERRORS.put(323, "申报量非申赎单位的整数倍");
        ERRORS.put(324, "无效的节点编号");
        ERRORS.put(325, "无效的资金比例");
        ERRORS.put(326, "找不到目标节点");
        ERRORS.put(327, "目标节点未连接");
        ERRORS.put(328, "源节点与目标节点相同");
        ERRORS.put(329, "现金替代比例超限");
        ERRORS.put(330, "无效的交易单元");
        ERRORS.put(331, "无效的交易日");
        ERRORS.put(332, "无效的IP地址");
        ERRORS.put(333, "无效的操作标志");
        ERRORS.put(334, "撤单与原报单信息不符");
        ERRORS.put(335, "无效的转移方向");
        ERRORS.put(336, "无效的市场状态");
        ERRORS.put(337, "功能不支持");
        ERRORS.put(338, "用户未登录");
        ERRORS.put(339, "用户未启用");
        ERRORS.put(340, "没有操作权限");
        ERRORS.put(341, "没有交易权限");
        ERRORS.put(342, "不支持撤单");
        ERRORS.put(343, "不支持申购");
        ERRORS.put(344, "未知的现金替代标志");
        ERRORS.put(345, "不支持赎回");
        ERRORS.put(346, "不支持拆分");
        ERRORS.put(347, "不支持合并");
        ERRORS.put(349, "未知的交易所代码");
        ERRORS.put(350, "不支持质押入库");
        ERRORS.put(351, "不支持质押出库");
        ERRORS.put(352, "未知的质押成交回报证券代码");
        ERRORS.put(353, "证券不支持交易");
        ERRORS.put(354, "用户已启用");
        ERRORS.put(355, "会话数超限");
        ERRORS.put(356, "重复登录");
        ERRORS.put(357, "不支持的登陆账户类别");
        ERRORS.put(358, "投资者适当性控制限制");
        ERRORS.put(359, "终端动态密码错误");
        ERRORS.put(360, "资金不足");
        ERRORS.put(361, "数量不足");
        ERRORS.put(362, "成分证券数量不足");
        ERRORS.put(366, "重复报单引用");
        ERRORS.put(369, "生成资金转移流水号失败");
        ERRORS.put(370, "生成仓位转移流水号失败");
        ERRORS.put(371, "找不到原操作流水");
        ERRORS.put(372, "非法的仓位类型");
        ERRORS.put(373, "非法的资金");
        ERRORS.put(374, "非法的转移数量");
        ERRORS.put(375, "仓位转移失败");
        ERRORS.put(376, "资金转移失败");
        ERRORS.put(377, "不支持的证券类别");
        ERRORS.put(378, "重复的请求流水号");
        ERRORS.put(379, "原流水已被冲正");
        ERRORS.put(380, "转账状态错误");
        ERRORS.put(381, "转移失败");
        ERRORS.put(382, "查询集中交易资金失败");
        ERRORS.put(383, "条件单挂接报单已成交");
        ERRORS.put(384, "条件单挂接报单已撤销");
        ERRORS.put(385, "无效的条件单触发类型");
        ERRORS.put(386, "条件单找不到相关报单");
        ERRORS.put(387, "无效的条件单数量条件");
        ERRORS.put(388, "无效的条件单价格tick数或数量倍数");
        ERRORS.put(389, "无效的条件单相关参数");
        ERRORS.put(390, "条件单数量超限");
        ERRORS.put(391, "无效的报单类型");
        ERRORS.put(392, "无效的撤单类型");
        ERRORS.put(393, "报盘内部错误");
        ERRORS.put(394, "报盘非法价格");
        ERRORS.put(395, "报盘非法报单编号");
        ERRORS.put(396, "报盘非法数量");
        ERRORS.put(397, "平台处于非开放状态");
        ERRORS.put(398, "交易所报单回报失败");
        ERRORS.put(399, "交易所撤单回报失败");
        ERRORS.put(400, "FDEP平台ETF申赎失败");
        ERRORS.put(401, "找不到关联股东账号");
        ERRORS.put(402, "找不到关联交易单元");
        ERRORS.put(403, "投资者代码与账户不一致");
        ERRORS.put(406, "转托管的转入交易单元为空值");
        ERRORS.put(407, "找不到债券转股信息");
        ERRORS.put(408, "找不到债券回售信息");
        ERRORS.put(410, "不可回售");
        ERRORS.put(411, "不可转股");
        ERRORS.put(412, "指定交易类别不正确");
        ERRORS.put(413, "深证转托管类别不正确");
        ERRORS.put(414, "证券停牌");
        ERRORS.put(415, "证券暂停上市后协议转让");
        ERRORS.put(416, "回购标准券使用率超限");
        ERRORS.put(417, "回购未到期金额超限");
        ERRORS.put(418, "银行代码与银行账号不符");
        ERRORS.put(419, "查询银行账户余额出错");
        ERRORS.put(420, "不可回售撤销");
        ERRORS.put(421, "超出买入上限");
        ERRORS.put(422, "超出卖出上限");
        ERRORS.put(423, "超出申购上限");
        ERRORS.put(424, "超出赎回上限");
        ERRORS.put(425, "超出质押入库上限");
        ERRORS.put(426, "超出质押出库上限");
        ERRORS.put(427, "超出转股上限");
        ERRORS.put(428, "超出回售上限");
        ERRORS.put(429, "超出配股上限");
        ERRORS.put(430, "超出总持仓上限");
        ERRORS.put(431, "超出基金拆分上限");
        ERRORS.put(432, "超出基金合并上限");
        ERRORS.put(433, "自成交检查拒绝");
        ERRORS.put(434, "超过最大在途查询数");
        ERRORS.put(437, "查询历史委托失败");
        ERRORS.put(438, "查询历史成交失败");
        ERRORS.put(439, "序列认证失败");
        ERRORS.put(440, "认证服务未连接");
        ERRORS.put(441, "认证中心执行错误");
        ERRORS.put(443, "密码已过期");
        ERRORS.put(444, "没有访问权限");
        ERRORS.put(446, "查询标记事件失败");
        ERRORS.put(447, "插入标记事件失败");
        ERRORS.put(448, "更新标记事件失败");
        ERRORS.put(449, "查询数据库失败");
        ERRORS.put(451, "统一客户认证失败");
        ERRORS.put(455, "无效的页定位符");
        ERRORS.put(456, "上次分页查询未结束");
        ERRORS.put(457, "找不到国际市场互联汇率");
        ERRORS.put(458, "不允许港股通整手买");
        ERRORS.put(459, "不允许港股通整手卖");
        ERRORS.put(460, "不允许港股通零股买");
        ERRORS.put(461, "不允许港股通零股卖");
        ERRORS.put(462, "深港通市场未开放");
        ERRORS.put(465, "修改密码失败");
        ERRORS.put(466, "找不到协议交易参数");
        ERRORS.put(467, "不可转让");
        ERRORS.put(468, "登录串token无效");
        ERRORS.put(469, "登录串token未生成");
        ERRORS.put(470, "登录串token不匹配");
        ERRORS.put(471, "登录串token已过期");
    }

    public static String getErrMsg(Integer errCode) {
        return "错误码：" + errCode + ", 错误信息：" + ERRORS.getOrDefault(errCode, "");
    }
}
